package com.tempjob.common.model;

import com.anwen.mongo.annotation.collection.CollectionField;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.util.List;

/**
 * @author hui
 * @Date 2024/12/2 16:45
 **/
@Data
@ApiModel("零工工作差异信息")
public class TempJobInfo {

    @ApiModelProperty("工作时间")
    @CollectionField(exist = false)
    private List<String> workDayList;

    @ApiModelProperty(value = "工作时间")
    @CollectionField("work_day_hire_list")
    private List<WorkDayModel> workDayHireList;

    @ApiModelProperty("记薪单位")
    @CollectionField("salary_unit")
    private String salaryUnit;

    @ApiModelProperty("薪水")
    private Integer salary;

    @ApiModelProperty("最少工作天数")
    private Integer leastWorkDay;

    @ApiModelProperty("招聘人数")
    private Integer hireTotal;

    @ApiModelProperty("结算方式:1日结2月结")
    @CollectionField("settlement_type")
    private Integer settlementType;

//    @ApiModelProperty("开始时间")
//    @DateTimeFormat(pattern = "yyyy-MM-dd")
//    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
//    private Date startDate;
//
//    @ApiModelProperty("结束时间")
//    @DateTimeFormat(pattern = "yyyy-MM-dd")
//    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
//    private Date endDate;

    @ApiModelProperty("薪资说明")
    private String salaryDesc;

    public String getSalaryDesc() {
        return salary + salaryUnit;
    }
}
